﻿<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:Avanade="urn:Avanade" xmlns:rs='urn:schemas-microsoft-com:rowset' xmlns:z='#RowsetSchema'>
  <xsl:template match="/">
  
    <table width="100%" border="0" cellspacing="0" cellpadding="0" summary="Webpart ANNONCE">
      <xsl:for-each select="xml/rs:data/z:row">
        <xsl:sort select="current()/@ows_Created" order="descending" />
        <xsl:if test="normalize-space(//EditFormURL) != ''">
          <tr>
            <td class="ms-addnew" style="background-color:#ffffff;width:100%;vertical-align:top;height:0%;padding:10px;font-size:10px;">
              <![CDATA[<img alt="" src="_layouts/images/rect.gif" />&nbsp;<a class="ms-addnew" href="]]><xsl:value-of select="//EditFormURL" /><![CDATA[">Modifier cette annonce</a>]]>
            </td>
          </tr>
        </xsl:if>
        <tr>
          <td style="background-color:#ffffff;width:100%;vertical-align:top;height:0%;padding:10px;font-size:10px;">
			<div id="artPage3" class="bloc_item" style="display: block;">
			<div class="item_title" style="display: inline-block;">
				<xsl:value-of select="current()/@ows_Surtitre" />
			</div>
            <H2><span class="highlight title">
              <xsl:value-of select="current()/@ows_Title" /> 
            </span></H2>
			
			<xsl:if test="/xml/Like = 'Actif'">
				<div class="item_title">
					<span class="item-like"><p><xsl:value-of select="/xml/NbLike"/></p><img src="/_layouts/VentePrivee2013/images/picto_like.jpg" height="17" width="19"/>
						<xsl:if test="not(/xml/UserCrtLike = 'OK')">
							<span class="item-like_text">
								<a href="javascript:JAime();">j'aime</a>
							</span>
						</xsl:if>
						<xsl:if test="/xml/LikeProcessed = 'OK'">
							<span class="item-like_text" style="color:#4f4f4f">
								Votre vote a été enregistré
							</span>
						</xsl:if>
					</span>
				</div>
				<input type="hidden" name="MyAction" value=""/>
				<script language="javascript">
					function JAime()
					{
						var frm = document.forms[0];
						frm.MyAction.value = "jaime";
						frm.submit();
					}
				</script>				
			</xsl:if>
			
			<div class="item_container">
				<div class="item_description">			
			<xsl:if test="current()/@ows_Date_x0020_publication">
                <div style="font-family:Arial;font-size:10pt;font-weight:bold;color:#4f4f4f;">
					<xsl:value-of select="Avanade:FormatDate(current()/@ows_Date_x0020_publication)" />
                </div>
			</xsl:if>
					
            <div class="item_content" style="display: inline-block;">
              <xsl:if test="normalize-space(translate(current()/@ows_Photo2, ',', '')) != ''">
                <div style="float:left;padding-right:10px">
                  <img style="border: solid 1px #fce4ee;">
                    <xsl:attribute name="src">
                      <xsl:value-of select="Avanade:FormatLink(current()/@ows_Photo2)" />
                    </xsl:attribute>
                  </img>
                </div>
              </xsl:if>
                <div style="font-family:Arial;font-size:10pt;font-weight:bold;color:#4f4f4f;">
                  <xsl:value-of select="current()/@ows_Chapeau" />
                </div>
                <br/>
	            <xsl:if test="Avanade:GetMediaType(current()/@ows_Video) = 'video'">
	              <div id="video_auto_7Container" style="align:center">You need the Flash Player version 8.0.0.0 or higher and a JavaScript enabled browser to view this site</div>
	              <script type="text/javascript">
					<xsl:if test="current()/@ows_Taille_x0020_video='Large'">
						setVideoSize(850,478);
					</xsl:if>
	                createPlayer7('<xsl:value-of select="Avanade:FormatLink(current()/@ows_Video)" />');
	              </script>
                  <br/>
	            </xsl:if>
	            <xsl:if test="Avanade:GetMediaType(current()/@ows_Video) = 'picture'">
	              <img style="border:solid 1px #fce4ee;">
	                <xsl:attribute name="src">
	                  <xsl:value-of select="Avanade:FormatLink(current()/@ows_Video)" />
	                </xsl:attribute>
	              </img>
				  <br/>
	            </xsl:if>
				<xsl:if test="/xml/ImageDroite01 or /xml/ImageDroite02 or /xml/ImageDroite03 or /xml/ImageDroite04 or /xml/ImageDroite05">
					<table width="100%" align="center" cellpadding="2">
						<tr>
							<td width="80%" valign="top">
								<div style="font-family:Arial;font-size:10pt;color:#4f4f4f;padding-right:10px;">
								  <xsl:value-of select="current()/@ows_Body" />
								</div>
							</td>
							<td width="20%" valign="top">
								<table width="100%" align="center">
									<tr>
										<xsl:if test="/xml/ImageDroite01">
											<td>
												<img border="0" src="{/xml/ImageDroite01}" style="margin: 0 0 6px 6px"/>
											</td>
										</xsl:if>
									</tr>
									<tr>
										<xsl:if test="/xml/ImageDroite02">
											<td>
												<img border="0" src="{/xml/ImageDroite02}" style="margin: 0 0 6px 6px"/>
											</td>
										</xsl:if>
									</tr>
									<tr>
										<xsl:if test="/xml/ImageDroite03">
											<td>
												<img border="0" src="{/xml/ImageDroite03}" style="margin: 0 0 6px 6px"/>
											</td>
										</xsl:if>
									</tr>
									<tr>
										<xsl:if test="/xml/ImageDroite04">
											<td>
												<img border="0" src="{/xml/ImageDroite04}" style="margin: 0 0 6px 6px"/>
											</td>
										</xsl:if>
									</tr>
									<tr>
										<xsl:if test="/xml/ImageDroite05">
											<td>
												<img border="0" src="{/xml/ImageDroite05}" style="margin: 0 0 6px 6px"/>
											</td>
										</xsl:if>
									</tr>
								</table>
							</td>
						</tr>
					</table>
				</xsl:if>
				<xsl:if test="not(/xml/ImageDroite01 or /xml/ImageDroite02 or /xml/ImageDroite03 or /xml/ImageDroite04 or /xml/ImageDroite05)">
					<div style="font-family:Arial;font-size:10pt;color:#4f4f4f">
					  <xsl:value-of select="current()/@ows_Body" />
					</div>
				</xsl:if>
				<xsl:if test="current()/@ows_ProgId = '3579;#'">
					<div WebPartID="1be32ca0-8723-4641-b507-d7cf2db237f4" HasPers="false" id="WebPartWPQ2" class="ms-WPBody" allowDelete="false" style="width:1000px;height:710px;overflow:hidden;" >
						<iframe title="Show Me What You Got" frameBorder="0" id="MSOPageViewerWebPart_WebPartWPQ2" name="MSOPageViewerWebPart_WebPartWPQ2" width="100%" height="100%" src="http://crea.vente-privee.com/SMWUG/index_vplink.php" ddf_src="http://crea.vente-privee.com/SMWUG/S01E03/index_vplink.html">
							<div class="UserGeneric">Le navigateur actuel ne prend pas en charge les pages qui contiennent l&#39;élément IFRAME. Pour utiliser ce composant WebPart, vous devez avoir recours à un navigateur qui prend en charge cet élément, tel que Microsoft Internet Explorer version 5 ou ultérieure.</div>
						</iframe>
					</div>
				</xsl:if>
				<xsl:if test="normalize-space(translate(current()/@ows_Compl_x00e9_ment_x0020_info, ',', '')) != ''">
					<p>
						<div style="font-family:Arial;font-size:10pt;color:#4f4f4f">
							<xsl:value-of select="Avanade:FormatBody(current()/@ows_Compl_x00e9_ment_x0020_info)" />
						</div>
					</p>
				</xsl:if>
				
				<xsl:if test="/xml/ImageHaut01 or /xml/ImageHaut02 or /xml/ImageHaut03 or /xml/ImageHaut04
				or /xml/ImageBas01 or /xml/ImageBas02 or /xml/ImageBas03 or /xml/ImageBas04
				or /xml/ImageBas11 or /xml/ImageBas12 or /xml/ImageBas13 or /xml/ImageBas14">
					
					<table cellspacing="0" cellpadding="0">
					<xsl:if test="/xml/ImageHaut01 or /xml/ImageHaut02 or /xml/ImageHaut03 or /xml/ImageHaut04">
						<tr>
							<td>
								<table width="100%" align="center" cellspacing="1px" cellpadding="1px">
									<tr>
										<xsl:if test="/xml/ImageHaut01">
											<td>
												<img border="0" src="{/xml/ImageHaut01}" style="margin: 0 0 6px 6px"/>
											</td>
										</xsl:if>
										<xsl:if test="/xml/ImageHaut02">
											<td>
												<img border="0" src="{/xml/ImageHaut02}" style="margin: 0 0 6px 6px"/>
											</td>
										</xsl:if>
										<xsl:if test="/xml/ImageHaut03">
											<td>
												<img border="0" src="{/xml/ImageHaut03}" style="margin: 0 0 6px 6px"/>
											</td>
										</xsl:if>
										<xsl:if test="/xml/ImageHaut04">
											<td>
												<img border="0" src="{/xml/ImageHaut04}" style="margin: 0 0 6px 6px"/>
											</td>
										</xsl:if>
									</tr>
								</table>
							</td>
						</tr>
					</xsl:if>
					<xsl:if test="/xml/ImageBas01 or /xml/ImageBas02 or /xml/ImageBas03 or /xml/ImageBas04">
						<tr>
							<td>
								<table width="100%" align="center" cellspacing="1px" cellpadding="1px">
									<tr>
										<xsl:if test="/xml/ImageBas01">
											<td>
												<img border="0" src="{/xml/ImageBas01}" style="margin: 0 0 6px 6px"/>
											</td>
										</xsl:if>
										<xsl:if test="/xml/ImageBas02">
											<td>
												<img border="0" src="{/xml/ImageBas02}" style="margin: 0 0 6px 6px"/>
											</td>
										</xsl:if>
										<xsl:if test="/xml/ImageBas03">
											<td>
												<img border="0" src="{/xml/ImageBas03}" style="margin: 0 0 6px 6px"/>
											</td>
										</xsl:if>
										<xsl:if test="/xml/ImageBas04">
											<td>
												<img border="0" src="{/xml/ImageBas04}" style="margin: 0 0 6px 6px"/>
											</td>
										</xsl:if>
									</tr>
								</table>
							</td>
						</tr>
					</xsl:if>
					<xsl:if test="/xml/ImageBas11 or /xml/ImageBas12 or /xml/ImageBas13 or /xml/ImageBas14">
						<tr>
							<td>
								<table width="100%" align="center" cellspacing="1px" cellpadding="1px">
									<tr>
										<xsl:if test="/xml/ImageBas11">
											<td>
												<img border="0" src="{/xml/ImageBas11}" style="margin: 0 0 6px 6px"/>
											</td>
										</xsl:if>
										<xsl:if test="/xml/ImageBas12">
											<td>
												<img border="0" src="{/xml/ImageBas12}" style="margin: 0 0 6px 6px"/>
											</td>
										</xsl:if>
										<xsl:if test="/xml/ImageBas13">
											<td>
												<img border="0" src="{/xml/ImageBas13}" style="margin: 0 0 6px 6px"/>
											</td>
										</xsl:if>
										<xsl:if test="/xml/ImageBas14">
											<td>
												<img border="0" src="{/xml/ImageBas14}" style="margin: 0 0 6px 6px"/>
											</td>
										</xsl:if>
									</tr>
								</table>
							</td>
						</tr>
					</xsl:if>
					</table>
				</xsl:if>
            </div>
			</div>
            <br/>
            <br/>
            <br/>
            <xsl:if test="Avanade:GetMediaType(current()/@ows_Media) = 'video'">
              <div id="video_auto_6Container" style="align:center">You need the Flash Player version 8.0.0.0 or higher and a JavaScript enabled browser to view this site</div>
              <script type="text/javascript">
				<xsl:if test="current()/@ows_Taille_x0020_video='Large'">
					setVideoSize(850,478);
				</xsl:if>
                createPlayer('<xsl:value-of select="Avanade:FormatLink(current()/@ows_Media)" />');
              </script>
            </xsl:if>
            <xsl:if test="Avanade:GetMediaType(current()/@ows_Media) = 'picture'">
              <img style="border:solid 1px #fce4ee;">
                <xsl:attribute name="src">
                  <xsl:value-of select="Avanade:FormatLink(current()/@ows_Media)" />
                </xsl:attribute>
              </img>
            </xsl:if>
			</div></div>
          </td>
        </tr>
      </xsl:for-each>
    </table>
  </xsl:template>
</xsl:stylesheet>